package cn.sirun.com.fca.account.repo.modify;

import com.tencent.cloud.iov.kernel.constant.HttpHeaderConst;
import com.tencent.cloud.iov.kernel.model.BaseResponse;

import cn.sirun.com.fca.account.model.base.SubmitPasswordRequest;
import cn.sirun.com.fca.account.model.login.AuthenticateRequest;
import cn.sirun.com.fca.account.model.login.AuthenticateResponse;
import cn.sirun.com.fca.account.model.login.ChallengeResponse;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface ModifyPassService {

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/edit_info/get_challenge")
    Observable<BaseResponse<ChallengeResponse>> challenge();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/edit_info/authenticate")
    Observable<BaseResponse<AuthenticateResponse>> authenticate(@Body AuthenticateRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/edit_info/get_set_params")
    Observable<BaseResponse<ChallengeResponse>> getSetParams();

    @Headers(HttpHeaderConst.ADD_COOKIE)
    @POST("/v2/account/edit_info/set_password")
    Observable<BaseResponse<Void>> setPassword(@Body SubmitPasswordRequest request);

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/get_challenge")
    Observable<BaseResponse<ChallengeResponse>> changeGetChallenge();

    @Headers({HttpHeaderConst.ADD_COOKIE, HttpHeaderConst.CONTENT_TYPE_JSON})
    @POST("/v2/account/change_info/authenticate")
    Observable<BaseResponse<AuthenticateResponse>> changeAuthenticate(@Body AuthenticateRequest request);


}
